/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.plechinger.mcremote.client;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

/**
 *
 * @author Lukas
 */
public class WaitPanel extends javax.swing.JPanel {

    private int stat=0;
    /**
     * Creates new form WaitPael
     */
    public WaitPanel() {
        initComponents();
        
        Thread thread=new Thread(new Runnable() {

            public void run() {
                while(true){
                    switch(stat){
                        case 0:
                           jLabel1.setText(".  ");
                            break;
                        case 1:
                            jLabel1.setText(" . ");
                            break;
                        case 2:
                            jLabel1.setText("  .");
                            break;
                        case 3:
                            jLabel1.setText(" . ");
                            break;
                    }
                    
                    stat++;
                    if(stat>3){
                        stat=0;
                    }
                    try {
                        Thread.sleep(200);
                    } catch (Exception e) {
                    }
                }
            }
        });
        thread.start();
    }

    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 48)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("...");
        add(jLabel1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
